package pojo;

import java.util.Date;

public class SalaryDTO {
    // 员工信息字段
    private Integer eId;
    private String eName;
    private Integer departmentId;
    private Integer positionId;

    // 薪酬信息字段
    private Integer sId;
    private Date effectiveDate;
    private Double baseSalary;
    private Double bonus;
    private Double benefits;
    private Double insurance;
    private Double tax;
    private String sDescription;
    private Date sCreatedAt;
    private Date sUpdatedAt;

    // 无参构造方法
    public SalaryDTO() {}

    // Getter和Setter方法
    public Integer getEId() {
        return eId;
    }

    public void setEId(Integer eId) {
        this.eId = eId;
    }

    public String getEName() {
        return eName;
    }

    public void setEName(String eName) {
        this.eName = eName;
    }

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public Integer getPositionId() {
        return positionId;
    }

    public void setPositionId(Integer positionId) {
        this.positionId = positionId;
    }

    public Integer getSId() {
        return sId;
    }

    public void setSId(Integer sId) {
        this.sId = sId;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Double getBaseSalary() {
        return baseSalary;
    }

    public void setBaseSalary(Double baseSalary) {
        this.baseSalary = baseSalary;
    }

    public Double getBonus() {
        return bonus;
    }

    public void setBonus(Double bonus) {
        this.bonus = bonus;
    }

    public Double getBenefits() {
        return benefits;
    }

    public void setBenefits(Double benefits) {
        this.benefits = benefits;
    }

    public Double getInsurance() {
        return insurance;
    }

    public void setInsurance(Double insurance) {
        this.insurance = insurance;
    }

    public Double getTax() {
        return tax;
    }

    public void setTax(Double tax) {
        this.tax = tax;
    }

    public String getSDescription() {
        return sDescription;
    }

    public void setSDescription(String sDescription) {
        this.sDescription = sDescription;
    }

    public Date getSCreatedAt() {
        return sCreatedAt;
    }

    public void setSCreatedAt(Date sCreatedAt) {
        this.sCreatedAt = sCreatedAt;
    }

    public Date getSUpdatedAt() {
        return sUpdatedAt;
    }

    public void setSUpdatedAt(Date sUpdatedAt) {
        this.sUpdatedAt = sUpdatedAt;
    }

    // 辅助方法：计算总薪酬
    public Double getTotalSalary() {
        return (baseSalary != null ? baseSalary : 0) +
                (bonus != null ? bonus : 0) +
                (benefits != null ? benefits : 0);
    }
}